package org.zerta.troops.utilities;

import java.io.FileInputStream;

public class StringFromFile {
	
	public static String readStringFromFile( String filename ) {
		String output = null;
		try {
			FileInputStream fis = new FileInputStream(filename);
			int x= fis.available();
			byte b[]= new byte[x];
			fis.read(b);
			output = new String(b);
		} catch (Exception e) {
			System.err.println("Failed reading from file " + filename);
			e.printStackTrace(System.err);
		}
		return output;
	}

}
